<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>手机号类型</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<style type="text/css">
    button{
        padding: 5px 20px 5px 20px;
        background-color: #8488f0;
        color: white;
    }
</style>
<body>
<form action="/searchByNumber">
    <input type="text" name="search_number" placeholder="请输入号码搜索">
    <input type="submit" value="搜索"  class="btn btn-success">

</form>

<div>
    <a th:href="@{/add}"><button type="button" class="btn btn-primary">添加</button></a>
    <a th:href="@{/phone}"><button type="button" class="btn btn-primary">查看全部</button></a>
</div>
<table class="table table-hover" style="width: 70%;">
    <thead>
    <tr>
        <th>编号</th>
        <th>手机号码</th>
        <th>运营商类型</th>
        <th>备注</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="phone:${phones}">
        <td th:text="${phone.type_id}"></td>
        <td th:text="${phone.number}"></td>
        <td th:text="${phone.type_name}"></td>
        <td th:text="${phone.type_remark}"></td>
        <td >
            <a class="btn btn-sm btn-primary" th:href="@{/toUpdate/}+${phone.type_id}">编辑</a>
            <a class="btn btn-sm btn-danger" th:href="@{/delPhone/}+${phone.type_id}">删除</a>
        </td>
    </tr>
    </tbody>
</table>


</body>
</html>